package New;


public class IndexOfString {
    public static void main(String[] args) {
        String s = "helloWorld";
        if (s.contains("ll")){
           String [] s1 =  s.split("ll");
            System.out.println("目标字符串出现在原字符串的第"+s1[0].length()+"位");
        }else {
            System.out.println("目标字符串不包含给定的字符串");
        }
    }
}
